package List;

import java.util.ArrayList;
import java.util.Iterator;

public class ArrayListDemo {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("add");
        list.add("bbb");
        list.add("ccc");
        list.add("ddd");
        for (Iterator it = list.iterator();it.hasNext();) {
        System.out.println(it.next());
        }
        ArrayList list1 = new ArrayList(list);
        for (Iterator it = list1.iterator(); it.hasNext();) {
            System.out.println(it.next());
        }
    }
}
